home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / Picture.h < prev    next >
C/C++ Source or Header  |  1990-05-15  |  1KB  |  32 lines

  1. #ifndef PICTURE_H
  2. #define PICTURE_H
  3.  
  4. // Picture.h -- A container for Shapes
  5.  
  6. // $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/Picture.h,v 3.0 90/05/15 22:44:00 kgorlen Rel $
  7.  
  8. #include "Shape.h"
  9. #include "OrderedCltn.h"
  10.  
  11. class Picture: public Shape {
  12.     DECLARE_MEMBERS(Picture);
  13.     OrderedCltn s;      // collection of pointers to shapes
  14. protected:              // storer() functions for object I/O
  15.     virtual void storer(OIOofd&) const;
  16.     virtual void storer(OIOout&) const;
  17. public:
  18.     Picture() : Shape(Point(0,0)) {}
  19.     Picture(Point& org) : Shape(org) {}
  20.     bool operator==(const Picture&) const;
  21.     bool operator!=(const Picture& a) const { return !(*this==a); }
  22.     void add(Shape&);   // add Shape to Picture
  23.     virtual void draw() const;
  24.     virtual void deepenShallowCopy();
  25.     virtual unsigned hash() const;
  26.     virtual bool isEqual(const Object&) const;
  27.     virtual void printOn(ostream& strm =cout) const;
  28.     virtual const Class* species() const;
  29. };
  30.  
  31. #endif
  32.